From: awilliam@xenbuild.aw Date: Wed, 26 Apr 2006 04:55:22 +0000 (-0600) Subject: [IA64] Fix the total memory info with xm info command X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16124 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=0d7d0c0cf2480bf6c1a8a997b9020e39b28b5ab2;p=xen.git [IA64] Fix the total memory info with xm info command This small patch intends to provide correct total memory info for control panel and fixed hardcode for that. The total memory info doesn't include the memory FW used. Signed-off-by : Zhang Xiantao --- diff --git a/xen/arch/ia64/xen/dom0_ops.c b/xen/arch/ia64/xen/dom0_ops.c index 01fe34afc0..bbcfdfecc8 100644 --- a/xen/arch/ia64/xen/dom0_ops.c +++ b/xen/arch/ia64/xen/dom0_ops.c @@ -19,7 +19,7 @@ #include #include #include - +extern unsigned long total_pages; long arch_do_dom0_op(dom0_op_t *op, GUEST_HANDLE(dom0_op_t) u_dom0_op) { long ret = 0; @@ -216,7 +216,7 @@ long arch_do_dom0_op(dom0_op_t *op, GUEST_HANDLE(dom0_op_t) u_dom0_op) pi->sockets_per_node = num_online_cpus() / cpus_weight(cpu_core_map[0]); pi->nr_nodes = 1; - pi->total_pages = 99; // FIXME + pi->total_pages = total_pages; pi->free_pages = avail_domheap_pages(); pi->cpu_khz = local_cpu_data->proc_freq / 1000; memset(pi->hw_cap, 0, sizeof(pi->hw_cap)); diff --git a/xen/arch/ia64/xen/xensetup.c b/xen/arch/ia64/xen/xensetup.c index b2e3c2c79a..caf8d5fe48 100644 --- a/xen/arch/ia64/xen/xensetup.c +++ b/xen/arch/ia64/xen/xensetup.c @@ -30,7 +30,7 @@ #error "struct shared_info does not not fit in PAGE_SIZE" #endif -unsigned long xenheap_phys_end; +unsigned long xenheap_phys_end, total_pages; char saved_command_line[COMMAND_LINE_SIZE]; char dom0_command_line[COMMAND_LINE_SIZE]; @@ -317,6 +317,7 @@ void start_kernel(void) printk("System RAM: %luMB (%lukB)\n", nr_pages >> (20 - PAGE_SHIFT), nr_pages << (PAGE_SHIFT - 10)); + total_pages = nr_pages; init_frametable();